package gameSite;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class SessionHandler {

	static ArrayList <SessionHandler> sessionList =  new ArrayList<SessionHandler>();
	
	HttpSession handlerSession;
	static int sessionID = 1;
	
	 SessionHandler(HttpServletRequest request, HttpServletResponse response)
	{
		HttpSession session = request.getSession(true);
		response.setContentType("text/html");
		handlerSession = session;
		sessionID++;
		addToSessionList();
	}
	
	ArrayList<SessionHandler>   	getSessionList()   		{ return sessionList; }
					   HttpSession    	getSession()     		{ return handlerSession; }
					     		void 		addToSessionList()  	{ sessionList.add(this); }
	
	
}
